#ifndef MKAHYPAR_CONTEXT_H
#define MKAHYPAR_CONTEXT_H
#include <string>
#include "mkahypar/utils/typedef.h"
#include "mkahypar/utils/enum_class.h"
namespace mkahypar{
  //全局配置
  class Context{
    Context() = default;
    ~Context() = default;

  public:
    Context(const Context &) = delete;
    Context(Context &&) = delete;
    Context &operator=(const Context &) = delete;
    Context &operator=(Context &&) = delete;

    static Context& getInstance(){
      static Context context;
      return context;
    }
    //node string id -> name 映射
    Map<std::string,int>nodeName2id;
    Map<int,std::string>id2nodeName;
    //fpga
    Map<std::string,int>fpgaName2id;
    Map<int,std::string>id2fpgaName;
    //输出目录
    std::string inputPath;
    std::string outputPath;
    //---------------------------------算法参数-------------------------------
    int run_time = 3600;//运行时间，默认一小时
    int max_iter = 500;//V循环最大迭代次数
    //---------------缩合参数-----------
    HypernodeID contraction_limit = 160;//顶点缩合下界
    HyperedgeID hyperedge_size_threshold = 2000;//过滤大边阈值
    int proportion = 3;//占fpga的比例
    NodeWeight max_allowed_node_weight;//缩合节点权重上界

    //-----------------------------预处理参数----------------------
    LouvainEdgeWeight community_detection_edge_weight;//社区检查参数
    //-----------------------------初始解参数--------------------
    double critical_node_factor = 0.1;//关键节点因子

    //---------------局部搜索参数-----------
    double adaptive_stopping_alpha = 1.0;//自适应停止参数

    //路由距离约束
    GainType hop_limit = 0;
  };
}
#endif //MKAHYPAR_CONTEXT_H
